/*
 * Dependencias:
 * - jquery-1.4.2.min.js
 */

var strHtml = "";
//var estilo1 = "style='position:absolute; width:100%; height:100%; top:0; left:0; z-index: 900000 !important;'"
var estilo1 = "style='width:100%; height:100%; top:0; left:0; z-index: 900000 !important;'"
var estilo2 = "style='display:none'"
strHtml = "<div id='cargaABCDE' "+estilo1+"><table>"+
          "<tr><td valign='middle'><center><img src='images/cargando.gif'/></center></td></tr>"+
          "</table></div>";
//document.writeln("<div id='cargaABCDE' style='display:none'></div>");
/*
var div = document.getElementById("cargaABCDE");
div.zindex = 10000;
*/
//var d = $(document); //div.style.width = d.width(); //alert(d.height() + " " + d.innerHeight() + " " + d.width() + " " + d.innerWidth());
/*
$(window).unload(function () { div.style.display = ""; });
$(window).load(function ()   { div.style.display = "none"; });
$(document).ready(function () {
	$("#ifrmContenido").unload(function () { div.style.display = ""; });
	$("#ifrmContenido").load  (function () { div.style.display = "none"; });
});
*/
function obtenerContenidoCargando() {
	return strHtml;
}
function iniciarCargaPagina() {
	try{
		$('#btnCerrarCargado2').css('display','none');
		$.blockUI({ 
	        message: $('#cargaABCDE2'), 
	        css: { 	top: '30%',
					left:'45%',
					width:160,
					height:180					
					
					} 
	    });
		
		var t=setTimeout("$('#btnCerrarCargado2').css('display','')",10000);
		
	}catch (e) {
		$('#btnCerrarCargado').css('display','none');
		$.blockUI({ 
	        message: $('#cargaABCDE'), 
	        css: { 	top: '30%',
					left:'45%',
					width:160,
					height:180
					} 
	    });
		var t=setTimeout("$('#btnCerrarCargado').css('display','')",10000);
	}
	/*div.style.display = "";
	div.zindex = 90000;*/
}
function finalizarCargaPagina() {
	try{
		$.unblockUI({ 
	        message: $('#cargaABCDE2'), 
	        css: { top: '20%' } 
	    });
	}catch (e) {
		$.unblockUI({ 
	        message: $('#cargaABCDE'), 
	        css: { top: '20%' } 
	    });
	}
	//div.style.display = "none";
}
